#include<stdio.h>
int average(int a,int b)
{
	return b+(a-b)/2;
}

int main()
{
	int a;
	int b;
	scanf("%d %d",&a,&b);
	int ave=average(a,b);
	printf("%d",ave);
 } 
